package gui;


import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;

public abstract class Button
{
	
	//Attributs
	private String name;
	private boolean selected;
	
	//Constructor
	public Button(String name)
	{
		this.name = name;
		this.selected = false;
	}

	public abstract void action();
	
	public void draw(int x, int y, Graphics g)
	{
		 if (this.selected == true) 
		 {
		     g.setColor(Color.white);
		     g.drawString("[ "+name+" ]", x, y);
		 }
		 else
		 {
		     g.setColor(Color.gray);
		     g.drawString("  "+name, x, y);
		 }

	}
	
	//******************************************************
	// GETTERS / SETTERS
	public boolean isSelected()
	{
		return this.selected;
	}
	
	public void setSelected(boolean selected)
	{
		this.selected = selected;
	}
}

